Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
conventional-changelog-conventionalcommits
Advanced tools
conventional-changelog conventionalcommits.org preset
The conventional-changelog-conventionalcommits package is a preset for the conventional-changelog tool that formats changelogs according to the Conventional Commits specification. This specification outlines a set of rules for creating an explicit commit history, which makes it easier to automate the generation of release notes.
Generating changelogs
This feature allows you to generate a changelog from git metadata using the conventional commits specification. The code sample demonstrates how to create a changelog stream and write it to a file.
const conventionalChangelog = require('conventional-changelog');
const fs = require('fs');
const stream = fs.createWriteStream('CHANGELOG.md');
conventionalChangelog({
preset: 'conventionalcommits'
}).pipe(stream);
Customizing changelog generation
This feature allows for customization of the changelog generation process. The code sample shows how to generate a changelog with all releases and includes a placeholder for additional configuration options.
const conventionalChangelog = require('conventional-changelog');
const fs = require('fs');
const stream = fs.createWriteStream('CHANGELOG.md');
conventionalChangelog({
preset: 'conventionalcommits',
releaseCount: 0, // Generate all releases
config: {
// Custom configuration here
}
}).pipe(stream);
standard-version is a utility for versioning using semver and CHANGELOG generation powered by conventional-changelog. It automates the versioning process and generates a changelog based on the conventions outlined in the Conventional Commits specification. It is similar to conventional-changelog-conventionalcommits but includes additional features for versioning and releasing.
lerna-changelog is a changelog generator for monorepos that use Lerna. It's tailored for repositories that use the Lerna tool and can group changes by Lerna packages. While it also generates changelogs based on commit messages, it is specifically designed for monorepo workflows and may not be as flexible as conventional-changelog-conventionalcommits for other types of projects.
semantic-release automates the whole package release workflow including determining the next version number, generating the release notes, and publishing the package. It uses the Conventional Commits specification to determine version bumps and changelog content. It provides a more comprehensive solution compared to conventional-changelog-conventionalcommits, which focuses solely on changelog generation.
A concrete implementation of the specification described at conventionalcommits.org for automated CHANGELOG generation and version management.
Use the Conventional Changelog CLI Quick Start with the -p conventionalcommits
option.
If you want to use this package directly and pass options, you can use the Conventional Changelog CLI Quick Start and with the --config
or -n
parameter, pass a js config that looks like this
'use strict'
const config = require('conventional-changelog-conventionalcommits')
module.exports = config({
"issuePrefixes": ["TEST-"],
"issueUrlFormat": "https://myBugTracker.com/{{prefix}}{{id}}"
})
or json config like that:
{
"options": {
"preset": {
"name": "conventionalchangelog",
"issuePrefixes": ["TEST-"],
"issueUrlFormat": "https://myBugTracker.com/{{prefix}}{{id}}"
}
}
}
This last json config way passes the preset
object to the conventional-changelog-preset-loader
package, that in turn, passes this same preset
object as the config for the conventional-changelog-conventionalcommits
.
See conventional-changelog-config-spec for available configuration options.
FAQs
Conventionalcommits.org preset for conventional-changelog.
The npm package conventional-changelog-conventionalcommits receives a total of 3,764,816 weekly downloads. As such, conventional-changelog-conventionalcommits popularity was classified as popular.
We found that conventional-changelog-conventionalcommits demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.